#! /bin/bash

echo -n "input string : "
read STR
VAR="hello"
case $STR in 
    "ABC")
        echo "ABC"
        ;;
    "123")
        echo "123"
        ;;
    "AC" | "BC") # 多个变量
        echo "AC or BC"
        ;;
    "$VAR")
        echo "$VAR"
        ;;
        # 匹配变量
    [1359bYN])
        echo "number"
        ;;
    [0-2])
        echo "$STR in [0-2]"
        ;;            
    *)
        echo "other"
        ;;
esac